/* 
redux的核心者 store
内部存储state, 引用reducer
*/
import {createStore, applyMiddleware} from 'redux'
import thunk from 'redux-thunk'
import {composeWithDevTools} from 'redux-devtools-extension'
import rootReducer from './reducers'

// 创建store, 指定reducer函数, 应用上redux的异步中间件, 启用redux调试工具
const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(thunk)))

export default store